using System;
using System.Collections.Generic;
using System.Text;
using QLPMT_DTO;
using QLPMT_DAO;

namespace QLPMT_BUS
{
   public class ThamSoBUS
    {
       // Lay tien kham
       public double GetTienKham()
       {
           double tienkham = new ThamSoDAO().GetThamSo().Tienkham;
           return tienkham;
       }
       //Lay benh nhan toi da
       public int GetBenhNhanToiDa()
       {
           int benhnhantoida = new ThamSoDAO().GetThamSo().Soluongbenhnhantoida;
           return benhnhantoida;
       }
      
       // Cap Nhat Qui Dinh MOi
       public Boolean InsertQuiDInh(int slbenhnhantoida,double tienkham)
       {
           try
           {
               ThamSo dto = new ThamSo(slbenhnhantoida, tienkham);
               new ThamSoDAO().CapNhatQuiDinh(dto);
           }
           catch
           {
               return false;
           }
           return true;
       }
    }
}
